package vrp;

import com.google.appengine.api.datastore.Key;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Client {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String name;

    @Persistent
    private String address;

    @Persistent
    private String postalCode;

    @Persistent
    private String contactNo;

    @Persistent
    private int status;

    @Persistent
    private Date createdAt;

    @Persistent
    private Date modifiedAt;

    public Client(String name, String address, String postalCode, String contactNo) {
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.contactNo = contactNo;
    	this.status = 0; 
    	this.createdAt = new Date();
    	this.modifiedAt = new Date();
    }

    public Key getKey() {
        return this.key;
    }

    public String getName() {
        return this.name;
    }

    public String getAddress() {
        return this.address;
    }

    public String getPostalCode() {
        return this.postalCode;
    }

    public String getContactNo() {
        return this.contactNo;
    }
    
    public int getStatus() {
        return this.status;
    }

    public Date getCreatedAt() {
        return this.createdAt;
    }

    public Date getModifiedAt() {
        return this.modifiedAt;
    }
    
    public void setKey(Key someKey) {
    	this.key = someKey;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAddress(String address) {
        this.address= address;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }
    
    public void setContactNo(String contactNo) {
        this.contactNo= contactNo;
    }    

    public void setStatus(int status) {
        this.status = status;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt= createdAt;
    }

    public void setModifiedAt(Date modifiedAt) {
        this.modifiedAt= modifiedAt;
    }
}